home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample SMSAM / SampleSMSAM Source / BuildingBlocks / DebugFlag.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-28  |  952 b   |  48 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        DebugFlag.h
  3.  
  4.     Copyright:    © 1991-1994 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Part of the AOCE Sample SMSAM Package.  Consult the license
  8.     which came with this software for your specific legal rights.
  9.  
  10. */
  11.  
  12.  
  13.  
  14. #ifndef __DEBUGFLAG__
  15. #define __DEBUGFLAG__
  16.  
  17. #ifndef __TYPES__
  18. #include <Types.h>
  19. #endif
  20.  
  21. class TDebugFlag
  22. {
  23. public:
  24.     //    Constructors:
  25.     TDebugFlag(short resourceID, OSType resourceType = 'DBGF'); // read from given resource type and ID
  26.  
  27.     //    Destructor
  28.     ~TDebugFlag();    // deconstructor, does nothing
  29.  
  30.     //    This returns the value of the flag-th flag
  31.     Boolean Flag (short flag) const;
  32.  
  33.     //    This sets the flag-th flag to the given value.  It returns the previous value.
  34.     Boolean SetFlag (short flag, Boolean newValue = true );
  35.  
  36.     // This clears the flag-th flag
  37.     void ClearFlag ( short flag );
  38.  
  39.     //    This clears all flags to 'off'
  40.     void ClearAll(void);
  41.  
  42. private:
  43.     Handle            fData;
  44.     short            fResFileNum;
  45. };
  46.  
  47. #endif    // __DEBUGFLAG__
  48.